#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
int main()
{
  int fd = open("myfifo",O_WRONLY);
  if(fd<0)
  {
    perror("open");
    return 1;
  }
  char buf[64];
  printf("please enter::");
  fflush(stdout);
  ssize_t s = read(0,buf,sizeof(buf)-1);
  if(s<0)
  {
    perror("read");
    return 1;
  }
  buf[s] = 0;
  write(fd,buf,strlen(buf));
  close(fd);
  return 0;
}
